package com.walker.weixin.entity.message;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.walker.weixin.entity.BaseMessage;

import java.io.Serializable;
import java.util.Map;

/**
 * @Description: 视频消息
 * @ProjectName: wms_step
 * @Package: com.walker.weixin.entity.message
 * @ClassName: VideoMessage
 * @Author: yangyl
 * @CreateDate: 2020-07-20 16:32
 */
@XStreamAlias("xml")
public class VideoMessage extends BaseMessage implements Serializable {

    @XStreamAlias("Video")
    private Video video;

    public VideoMessage(Map<String, Object> requestMap, String mediaId) {
        super(requestMap, "video");
        video = new Video(mediaId);
    }

    public VideoMessage(Map<String, Object> requestMap, String mediaId,
                        String title,String description) {
        super(requestMap, "video");
        video = new Video(mediaId,title,description);
    }


    /**
     * 视频消息
     */
    public static class Video implements Serializable {


        //视频id
        @XStreamAlias("MediaId")
        private String mediaId;

        //视频标题
        @XStreamAlias("Title")
        private String title;

        //视频描述
        @XStreamAlias("Description")
        private String description;

        public Video(String mediaId) {
            this.mediaId = mediaId;
        }

        public Video(String mediaId, String title, String description) {
            this.mediaId = mediaId;
            this.title = title;
            this.description = description;
        }


        public String getMediaId() {
            return mediaId;
        }

        public void setMediaId(String mediaId) {
            this.mediaId = mediaId;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }
    }


}